import request from '@/utils/request'

// 查询故障日志管理列表
export function listFaultLog(query) {
  return request({
    url: '/monitor/faultlog/list',
    method: 'get',
    params: query
  })
}

// 查询故障日志管理详细
export function getFaultLog(id) {
  return request({
    url: '/monitor/faultlog/' + id,
    method: 'get'
  })
}

// 新增故障日志管理
export function addFaultLog(data) {
  return request({
    url: '/monitor/faultlog',
    method: 'post',
    data: data
  })
}

// 修改故障日志管理
export function updateFaultLog(data) {
  return request({
    url: '/monitor/faultlog',
    method: 'put',
    data: data
  })
}

// 删除故障日志管理
export function delFaultLog(id) {
  return request({
    url: '/monitor/faultlog/' + id,
    method: 'delete'
  })
}

// 清空设备状态日志
export function cleanFaultLog() {
  return request({
    url: '/monitor/faultlog/clean',
    method: 'delete'
  })
}

// 故障图片上传
export function commonUpload(data) {
  return request({
    url: '/minio/upload',
    method: 'post',
    data,
    headers: {
      repeatSubmit: false
    }
  })
}


